import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui'
import router from "./router";
import "@/utils"
import 'element-ui/lib/theme-chalk/index.css'
import '@/style/style.scss'
import BaiduMap from 'vue-baidu-map'
import 'wowjs/css/libs/animate.css'
import animate from 'animate.css';
import axios from 'axios'

import VueAwesomeSwiper from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
import Vuex from 'vuex';
import Api from './api/index'
import smoothscroll from "smoothscroll-polyfill"
smoothscroll.polyfill();
// 使用插件

import store from './store';
// markdown样式
import "github-markdown-css";
// 代码高亮
import "highlight.js/styles/github.css"; //默认样式

Vue.directive('scroll', {
  inserted: function(el, binding) {
    window.addEventListener('scroll', binding.value, { passive: true });
  },
  unbind: function(el, binding) {
    window.removeEventListener('scroll', binding.value, { passive: true });
  }
});
Vue.prototype.$axios = axios
Vue.prototype.$api = Api
Vue.prototype.$footerData = ''
Vue.use(VueAwesomeSwiper)
Vue.use(animate)
Vue.use(Vuex);
Vue.use(BaiduMap, {
  // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
  ak: 'YPIBU2OqE433FGGjbQlzmkGM84fBf9NW'
})
Vue.config.productionTip = false
Vue.use(ElementUI)

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')